package pCloud.message;

import java.io.Serializable;
import java.net.InetSocketAddress;

public class Message implements Serializable {
	public static int CLIENT_TO_PROXY_MSG = 0;
	public static int PROXY_TO_DATA_MSG = 1;
	public static int DATA_TO_PROXY_MSG = 2;
	public static int PROXY_TO_CLIEN_MSG = 3; 
	public static int CLIENT_TO_SERVER = 4;
	public static int SERVER_TO_CLIENT = 5;
	InetSocketAddress from, to;

	public InetSocketAddress getFrom() {
		return from;
	}


	public InetSocketAddress getTo() {
		return to;
	}

	int type;
	Object content;

	public Message(InetSocketAddress from, InetSocketAddress to, Object ct,
			int type) {
		this.from = from;
		this.to = to; 
		this.content = ct;
		this.type = type;
	}


	public Object getMessageContent() {
		return this.content;
	}

	public int getMessageType() {
		return this.type;
	}
	
	public void setMessageType(int type){
		this.type = type;
	}
}
